/*     */ package com.jcraft.jzlib;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ final class InfTree
/*     */ {
/*     */   private static final int MANY = 1440;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_OK = 0;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_STREAM_END = 1;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_NEED_DICT = 2;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_ERRNO = -1;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_STREAM_ERROR = -2;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_DATA_ERROR = -3;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_MEM_ERROR = -4;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_BUF_ERROR = -5;
/*     */   
/*     */ 
/*     */ 
/*     */   private static final int Z_VERSION_ERROR = -6;
/*     */   
/*     */ 
/*     */ 
/*     */   static final int fixed_bl = 9;
/*     */   
/*     */ 
/*     */   static final int fixed_bd = 5;
/*     */   
/*     */ 
/*  54 */   static final int[] fixed_tl = { 96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 
/*  55 */     82, 7, 31, 0, 8, 112, 0, 8, 48, 0, 9, 192, 80, 7, 10, 0, 8, 96, 
/*  56 */     0, 8, 32, 0, 9, 160, 0, 8, 0, 0, 8, 128, 0, 8, 64, 0, 9, 224, 80, 7, 
/*  57 */     6, 0, 8, 88, 0, 8, 24, 0, 9, 144, 83, 7, 59, 0, 8, 120, 0, 8, 56, 
/*  58 */     0, 9, 208, 81, 7, 17, 0, 8, 104, 0, 8, 40, 0, 9, 176, 0, 8, 8, 
/*  59 */     0, 8, 136, 0, 8, 72, 0, 9, 240, 80, 7, 4, 0, 8, 84, 0, 8, 20, 85, 8, 
/*  60 */     227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 200, 81, 7, 13, 0, 8, 
/*  61 */     100, 0, 8, 36, 0, 9, 168, 0, 8, 4, 0, 8, 132, 0, 8, 68, 0, 9, 232, 
/*  62 */     80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 152, 84, 7, 83, 0, 8, 124, 
/*  63 */     0, 8, 60, 0, 9, 216, 82, 7, 23, 0, 8, 108, 0, 8, 44, 0, 9, 184, 0, 8, 
/*  64 */     12, 0, 8, 140, 0, 8, 76, 0, 9, 248, 80, 7, 3, 0, 8, 82, 0, 8, 18, 
/*  65 */     85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 0, 9, 196, 81, 7, 11, 
/*  66 */     0, 8, 98, 0, 8, 34, 0, 9, 164, 0, 8, 2, 0, 8, 130, 0, 8, 66, 0, 9, 
/*  67 */     228, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 148, 84, 7, 67, 0, 8, 122, 
/*  68 */     0, 8, 58, 0, 9, 212, 82, 7, 19, 0, 8, 106, 0, 8, 42, 0, 9, 180, 
/*  69 */     0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 244, 80, 7, 5, 0, 8, 86, 0, 8, 
/*  70 */     22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 0, 9, 204, 81, 7, 
/*  71 */     15, 0, 8, 102, 0, 8, 38, 0, 9, 172, 0, 8, 6, 0, 8, 134, 0, 8, 70, 
/*  72 */     0, 9, 236, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 156, 84, 7, 99, 
/*  73 */     0, 8, 126, 0, 8, 62, 0, 9, 220, 82, 7, 27, 0, 8, 110, 0, 8, 46, 0, 9, 
/*  74 */     188, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 252, 96, 7, 256, 0, 8, 
/*  75 */     81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 0, 8, 49, 0, 9, 
/*  76 */     194, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 162, 0, 8, 1, 0, 8, 129, 
/*  77 */     0, 8, 65, 0, 9, 226, 80, 7, 6, 0, 8, 89, 0, 8, 25, 0, 9, 146, 83, 
/*  78 */     7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 210, 81, 7, 17, 0, 8, 105, 0, 8, 
/*  79 */     41, 0, 9, 178, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 242, 80, 7, 4, 
/*  80 */     0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 117, 0, 8, 53, 
/*  81 */     0, 9, 202, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 170, 0, 8, 5, 0, 8, 
/*  82 */     133, 0, 8, 69, 0, 9, 234, 80, 7, 8, 0, 8, 93, 0, 8, 29, 0, 9, 154, 
/*  83 */     84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 218, 82, 7, 23, 0, 8, 109, 
/*  84 */     0, 8, 45, 0, 9, 186, 0, 8, 13, 0, 8, 141, 0, 8, 77, 0, 9, 250, 80, 7, 
/*  85 */     3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 0, 8, 115, 0, 8, 51, 
/*  86 */     0, 9, 198, 81, 7, 11, 0, 8, 99, 0, 8, 35, 0, 9, 166, 0, 8, 3, 0, 8, 
/*  87 */     131, 0, 8, 67, 0, 9, 230, 80, 7, 7, 0, 8, 91, 0, 8, 27, 0, 9, 150, 
/*  88 */     84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 214, 82, 7, 19, 0, 8, 107, 
/*  89 */     0, 8, 43, 0, 9, 182, 0, 8, 11, 0, 8, 139, 0, 8, 75, 0, 9, 246, 80, 7, 
/*  90 */     5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 51, 0, 8, 119, 0, 8, 55, 
/*  91 */     0, 9, 206, 81, 7, 15, 0, 8, 103, 0, 8, 39, 0, 9, 174, 0, 8, 7, 
/*  92 */     0, 8, 135, 0, 8, 71, 0, 9, 238, 80, 7, 9, 0, 8, 95, 0, 8, 31, 0, 9, 
/*  93 */     158, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 222, 82, 7, 27, 0, 8, 
/*  94 */     111, 0, 8, 47, 0, 9, 190, 0, 8, 15, 0, 8, 143, 0, 8, 79, 0, 9, 254, 
/*  95 */     96, 7, 256, 0, 8, 80, 0, 8, 16, 84, 8, 115, 82, 7, 31, 0, 8, 112, 
/*  96 */     0, 8, 48, 0, 9, 193, 
/*     */     
/*  98 */     80, 7, 10, 0, 8, 96, 0, 8, 32, 0, 9, 161, 0, 8, 0, 0, 8, 128, 0, 8, 
/*  99 */     64, 0, 9, 225, 80, 7, 6, 0, 8, 88, 0, 8, 24, 0, 9, 145, 83, 7, 59, 
/* 100 */     0, 8, 120, 0, 8, 56, 0, 9, 209, 81, 7, 17, 0, 8, 104, 0, 8, 40, 
/* 101 */     0, 9, 177, 0, 8, 8, 0, 8, 136, 0, 8, 72, 0, 9, 241, 80, 7, 4, 0, 8, 
/* 102 */     84, 0, 8, 20, 85, 8, 227, 83, 7, 43, 0, 8, 116, 0, 8, 52, 0, 9, 
/* 103 */     201, 81, 7, 13, 0, 8, 100, 0, 8, 36, 0, 9, 169, 0, 8, 4, 0, 8, 132, 
/* 104 */     0, 8, 68, 0, 9, 233, 80, 7, 8, 0, 8, 92, 0, 8, 28, 0, 9, 153, 84, 
/* 105 */     7, 83, 0, 8, 124, 0, 8, 60, 0, 9, 217, 82, 7, 23, 0, 8, 108, 0, 8, 
/* 106 */     44, 0, 9, 185, 0, 8, 12, 0, 8, 140, 0, 8, 76, 0, 9, 249, 80, 7, 3, 
/* 107 */     0, 8, 82, 0, 8, 18, 85, 8, 163, 83, 7, 35, 0, 8, 114, 0, 8, 50, 
/* 108 */     0, 9, 197, 81, 7, 11, 0, 8, 98, 0, 8, 34, 0, 9, 165, 0, 8, 2, 0, 8, 
/* 109 */     130, 0, 8, 66, 0, 9, 229, 80, 7, 7, 0, 8, 90, 0, 8, 26, 0, 9, 149, 
/* 110 */     84, 7, 67, 0, 8, 122, 0, 8, 58, 0, 9, 213, 82, 7, 19, 0, 8, 106, 
/* 111 */     0, 8, 42, 0, 9, 181, 0, 8, 10, 0, 8, 138, 0, 8, 74, 0, 9, 245, 80, 7, 
/* 112 */     5, 0, 8, 86, 0, 8, 22, 192, 8, 0, 83, 7, 51, 0, 8, 118, 0, 8, 54, 
/* 113 */     0, 9, 205, 81, 7, 15, 0, 8, 102, 0, 8, 38, 0, 9, 173, 0, 8, 6, 
/* 114 */     0, 8, 134, 0, 8, 70, 0, 9, 237, 80, 7, 9, 0, 8, 94, 0, 8, 30, 0, 9, 
/* 115 */     157, 84, 7, 99, 0, 8, 126, 0, 8, 62, 0, 9, 221, 82, 7, 27, 0, 8, 
/* 116 */     110, 0, 8, 46, 0, 9, 189, 0, 8, 14, 0, 8, 142, 0, 8, 78, 0, 9, 253, 
/* 117 */     96, 7, 256, 0, 8, 81, 0, 8, 17, 85, 8, 131, 82, 7, 31, 0, 8, 113, 
/* 118 */     0, 8, 49, 0, 9, 195, 80, 7, 10, 0, 8, 97, 0, 8, 33, 0, 9, 163, 
/* 119 */     0, 8, 1, 0, 8, 129, 0, 8, 65, 0, 9, 227, 80, 7, 6, 0, 8, 89, 0, 8, 25, 
/* 120 */     0, 9, 147, 83, 7, 59, 0, 8, 121, 0, 8, 57, 0, 9, 211, 81, 7, 17, 
/* 121 */     0, 8, 105, 0, 8, 41, 0, 9, 179, 0, 8, 9, 0, 8, 137, 0, 8, 73, 0, 9, 
/* 122 */     243, 80, 7, 4, 0, 8, 85, 0, 8, 21, 80, 8, 258, 83, 7, 43, 0, 8, 
/* 123 */     117, 0, 8, 53, 0, 9, 203, 81, 7, 13, 0, 8, 101, 0, 8, 37, 0, 9, 
/* 124 */     171, 0, 8, 5, 0, 8, 133, 0, 8, 69, 0, 9, 235, 80, 7, 8, 0, 8, 93, 
/* 125 */     0, 8, 29, 0, 9, 155, 84, 7, 83, 0, 8, 125, 0, 8, 61, 0, 9, 219, 82, 
/* 126 */     7, 23, 0, 8, 109, 0, 8, 45, 0, 9, 187, 0, 8, 13, 0, 8, 141, 0, 8, 
/* 127 */     77, 0, 9, 251, 80, 7, 3, 0, 8, 83, 0, 8, 19, 85, 8, 195, 83, 7, 35, 
/* 128 */     0, 8, 115, 0, 8, 51, 0, 9, 199, 81, 7, 11, 0, 8, 99, 0, 8, 35, 
/* 129 */     0, 9, 167, 0, 8, 3, 0, 8, 131, 0, 8, 67, 0, 9, 231, 80, 7, 7, 0, 8, 
/* 130 */     91, 0, 8, 27, 0, 9, 151, 84, 7, 67, 0, 8, 123, 0, 8, 59, 0, 9, 215, 
/* 131 */     82, 7, 19, 0, 8, 107, 0, 8, 43, 0, 9, 183, 0, 8, 11, 0, 8, 139, 
/* 132 */     0, 8, 75, 0, 9, 247, 80, 7, 5, 0, 8, 87, 0, 8, 23, 192, 8, 0, 83, 7, 
/* 133 */     51, 0, 8, 119, 0, 8, 55, 0, 9, 207, 81, 7, 15, 0, 8, 103, 0, 8, 39, 
/* 134 */     0, 9, 175, 0, 8, 7, 0, 8, 135, 0, 8, 71, 0, 9, 239, 80, 7, 9, 0, 8, 
/* 135 */     95, 0, 8, 31, 0, 9, 159, 84, 7, 99, 0, 8, 127, 0, 8, 63, 0, 9, 223, 
/* 136 */     82, 7, 27, 0, 8, 111, 0, 8, 47, 0, 9, 191, 0, 8, 15, 0, 8, 143, 
/* 137 */     0, 8, 79, 0, 9, 255 };
/* 138 */   static final int[] fixed_td = { 80, 5, 1, 87, 5, 257, 83, 5, 17, 91, 5, 
/* 139 */     4097, 81, 5, 5, 89, 5, 1025, 85, 5, 65, 93, 5, 16385, 80, 5, 3, 88, 
/* 140 */     5, 513, 84, 5, 33, 92, 5, 8193, 82, 5, 9, 90, 5, 2049, 86, 5, 129, 
/* 141 */     192, 5, 24577, 80, 5, 2, 87, 5, 385, 83, 5, 25, 91, 5, 6145, 81, 5, 
/* 142 */     7, 89, 5, 1537, 85, 5, 97, 93, 5, 24577, 80, 5, 4, 88, 5, 769, 84, 
/* 143 */     5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 
/* 144 */     24577 };
/*     */   
/*     */ 
/* 147 */   static final int[] cplens = {
/* 148 */     3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 
/* 149 */     67, 83, 99, 115, 131, 163, 195, 227, 258 };
/*     */   
/*     */ 
/* 152 */   static final int[] cplext = {
/* 153 */     0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 
/* 154 */     5, 5, 5, 0, 112, 112 };
/*     */   
/*     */ 
/* 157 */   static final int[] cpdist = {
/* 158 */     1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 
/* 159 */     769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 };
/*     */   
/* 161 */   static final int[] cpdext = {
/* 162 */     0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 
/* 163 */     11, 11, 12, 12, 13, 13 };
/*     */   
/*     */ 
/*     */   static final int BMAX = 15;
/*     */   
/* 168 */   int[] hn = null;
/* 169 */   int[] v = null;
/* 170 */   int[] c = null;
/* 171 */   int[] r = null;
/* 172 */   int[] u = null;
/* 173 */   int[] x = null;
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   private int huft_build(int[] b, int bindex, int n, int s, int[] d, int[] e, int[] t, int[] m, int[] hp, int[] hn, int[] v)
/*     */   {
/* 214 */     int p = 0;
/* 215 */     int i = n;
/*     */     do {
/* 217 */       this.c[b[(bindex + p)]] += 1;
/* 218 */       p++;
/* 219 */       i--;
/* 220 */     } while (i != 0);
/*     */     
/* 222 */     if (this.c[0] == n) {
/* 223 */       t[0] = -1;
/* 224 */       m[0] = 0;
/* 225 */       return 0;
/*     */     }
/*     */     
/*     */ 
/* 229 */     int l = m[0];
/* 230 */     for (int j = 1; j <= 15; j++)
/* 231 */       if (this.c[j] != 0)
/*     */         break;
/* 233 */     int k = j;
/* 234 */     if (l < j) {
/* 235 */       l = j;
/*     */     }
/* 237 */     for (i = 15; i != 0; i--) {
/* 238 */       if (this.c[i] != 0)
/*     */         break;
/*     */     }
/* 241 */     int g = i;
/* 242 */     if (l > i) {
/* 243 */       l = i;
/*     */     }
/* 245 */     m[0] = l;
/*     */     
/*     */ 
/* 248 */     for (int y = 1 << j; j < i; y <<= 1) {
/* 249 */       if (y -= this.c[j] < 0) {
/* 250 */         return -3;
/*     */       }
/* 248 */       j++;
/*     */     }
/*     */     
/*     */ 
/*     */ 
/* 253 */     if (y -= this.c[i] < 0) {
/* 254 */       return -3;
/*     */     }
/* 256 */     this.c[i] += y;
/*     */     
/*     */ 
/* 259 */     this.x[1] = (j = 0);
/* 260 */     p = 1;
/* 261 */     int xp = 2;
/*     */     do {
/* 263 */       this.x[xp] = (j += this.c[p]);
/* 264 */       xp++;
/* 265 */       p++;i--;
/* 262 */     } while (i != 0);
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 269 */     i = 0;
/* 270 */     p = 0;
/*     */     do {
/* 272 */       if ((j = b[(bindex + p)]) != 0) {
/* 273 */         int tmp307_305 = j; int[] tmp307_302 = this.x; int tmp309_308 = tmp307_302[tmp307_305];tmp307_302[tmp307_305] = (tmp309_308 + 1);v[tmp309_308] = i;
/*     */       }
/* 275 */       p++;
/* 276 */       i++;
/* 271 */     } while (
/*     */     
/*     */ 
/*     */ 
/*     */ 
/* 276 */       i < n);
/* 277 */     n = this.x[g];
/*     */     
/*     */ 
/* 280 */     this.x[0] = (i = 0);
/* 281 */     p = 0;
/* 282 */     int h = -1;
/* 283 */     int w = -l;
/* 284 */     this.u[0] = 0;
/* 285 */     int q = 0;
/* 286 */     int z = 0;
/* 289 */     for (; 
/*     */         
/* 289 */         k <= g; k++) {
/* 290 */       int a = this.c[k];
/* 291 */       int mask; for (; a-- != 0; 
/*     */           
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 366 */           (i & mask) != this.x[h])
/*     */       {
/* 295 */         h++;
/* 294 */         while (k > w + l)
/*     */         {
/* 296 */           w += l;
/*     */           
/* 298 */           z = g - w;
/* 299 */           z = z > l ? l : z;
/* 300 */           int f; if ((f = 1 << (j = k - w)) > a + 1)
/*     */           {
/*     */ 
/* 303 */             f -= a + 1;
/* 304 */             xp = k;
/* 305 */             if (j < z) {
/*     */               do {
/* 307 */                 if (f <<= 1 <= this.c[(++xp)])
/*     */                   break;
/* 309 */                 f -= this.c[xp];j++;
/* 306 */               } while (j < z);
/*     */             }
/*     */           }
/*     */           
/*     */ 
/*     */ 
/*     */ 
/* 313 */           z = 1 << j;
/*     */           
/*     */ 
/* 316 */           if (hn[0] + z > 1440) {
/* 317 */             return -3;
/*     */           }
/* 319 */           this.u[h] = (q = hn[0]);
/* 320 */           hn[0] += z;
/*     */           
/*     */ 
/* 323 */           if (h != 0) {
/* 324 */             this.x[h] = i;
/* 325 */             this.r[0] = ((byte)j);
/* 326 */             this.r[1] = ((byte)l);
/* 327 */             j = i >>> w - l;
/* 328 */             this.r[2] = (q - this.u[(h - 1)] - j);
/* 329 */             System.arraycopy(this.r, 0, hp, (this.u[(h - 1)] + j) * 3, 3);
/*     */ 
/*     */           }
/*     */           else
/*     */           {
/* 334 */             t[0] = q;
/*     */           }
/*     */         }
/*     */         
/*     */ 
/* 339 */         this.r[1] = ((byte)(k - w));
/* 340 */         if (p >= n) {
/* 341 */           this.r[0] = 192;
/* 342 */         } else if (v[p] < s) {
/* 343 */           this.r[0] = ((byte)(v[p] < 256 ? 0 : 96));
/*     */           
/* 345 */           this.r[2] = v[(p++)];
/*     */         } else {
/* 347 */           this.r[0] = ((byte)(e[(v[p] - s)] + 16 + 64));
/*     */           
/* 349 */           this.r[2] = d[(v[(p++)] - s)];
/*     */         }
/*     */         
/*     */ 
/* 353 */         int f = 1 << k - w;
/* 354 */         for (j = i >>> w; j < z; j += f) {
/* 355 */           System.arraycopy(this.r, 0, hp, (q + j) * 3, 3);
/*     */         }
/*     */         
/*     */ 
/* 359 */         for (j = 1 << k - 1; (i & j) != 0; j >>>= 1) {
/* 360 */           i ^= j;
/*     */         }
/* 362 */         i ^= j;
/*     */         
/*     */ 
/* 365 */         mask = (1 << w) - 1;
/* 366 */         continue;
/* 367 */         h--;
/* 368 */         w -= l;
/* 369 */         mask = (1 << w) - 1;
/*     */       }
/*     */     }
/*     */     
/*     */ 
/* 374 */     return (y != 0) && (g != 1) ? -5 : 0;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZStream z)
/*     */   {
/* 384 */     initWorkArea(19);
/* 385 */     this.hn[0] = 0;
/* 386 */     int result = huft_build(c, 0, 19, 19, null, null, tb, bb, hp, this.hn, this.v);
/*     */     
/* 388 */     if (result == -3) {
/* 389 */       z.msg = "oversubscribed dynamic bit lengths tree";
/* 390 */     } else if ((result == -5) || (bb[0] == 0)) {
/* 391 */       z.msg = "incomplete dynamic bit lengths tree";
/* 392 */       result = -3;
/*     */     }
/* 394 */     return result;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   int inflate_trees_dynamic(int nl, int nd, int[] c, int[] bl, int[] bd, int[] tl, int[] td, int[] hp, ZStream z)
/*     */   {
/* 410 */     initWorkArea(288);
/* 411 */     this.hn[0] = 0;
/* 412 */     int result = huft_build(c, 0, nl, 257, cplens, cplext, tl, bl, hp, this.hn, this.v);
/* 413 */     if ((result != 0) || (bl[0] == 0)) {
/* 414 */       if (result == -3) {
/* 415 */         z.msg = "oversubscribed literal/length tree";
/* 416 */       } else if (result != -4) {
/* 417 */         z.msg = "incomplete literal/length tree";
/* 418 */         result = -3;
/*     */       }
/* 420 */       return result;
/*     */     }
/*     */     
/*     */ 
/* 424 */     initWorkArea(288);
/* 425 */     result = huft_build(c, nl, nd, 0, cpdist, cpdext, td, bd, hp, this.hn, this.v);
/*     */     
/* 427 */     if ((result != 0) || ((bd[0] == 0) && (nl > 257))) {
/* 428 */       if (result == -3) {
/* 429 */         z.msg = "oversubscribed distance tree";
/* 430 */       } else if (result == -5) {
/* 431 */         z.msg = "incomplete distance tree";
/* 432 */         result = -3;
/* 433 */       } else if (result != -4) {
/* 434 */         z.msg = "empty distance tree with lengths";
/* 435 */         result = -3;
/*     */       }
/* 437 */       return result;
/*     */     }
/*     */     
/* 440 */     return 0;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   static int inflate_trees_fixed(int[] bl, int[] bd, int[][] tl, int[][] td, ZStream z)
/*     */   {
/* 449 */     bl[0] = 9;
/* 450 */     bd[0] = 5;
/* 451 */     tl[0] = fixed_tl;
/* 452 */     td[0] = fixed_td;
/* 453 */     return 0;
/*     */   }
/*     */   
/*     */   private void initWorkArea(int vsize) {
/* 457 */     if (this.hn == null) {
/* 458 */       this.hn = new int[1];
/* 459 */       this.v = new int[vsize];
/* 460 */       this.c = new int[16];
/* 461 */       this.r = new int[3];
/* 462 */       this.u = new int[15];
/* 463 */       this.x = new int[16];
/*     */     }
/* 465 */     if (this.v.length < vsize) {
/* 466 */       this.v = new int[vsize];
/*     */     }
/* 468 */     for (int i = 0; i < vsize; i++) {
/* 469 */       this.v[i] = 0;
/*     */     }
/* 471 */     for (int i = 0; i < 16; i++) {
/* 472 */       this.c[i] = 0;
/*     */     }
/* 474 */     for (int i = 0; i < 3; i++) {
/* 475 */       this.r[i] = 0;
/*     */     }
/*     */     
/* 478 */     System.arraycopy(this.c, 0, this.u, 0, 15);
/*     */     
/* 480 */     System.arraycopy(this.c, 0, this.x, 0, 16);
/*     */   }
/*     */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\com\jcraft\jzlib\InfTree.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */